// 由后台控制的菜单,在这里配置
//name,title 可配可不配
// component 没有子菜单的必须配置（有子菜单的不需要配置）
// icon 一级菜单需要配置icon(原路由icon配置)，如果后台配置了菜单图标，则会使用后台的图标
// showRole:[]  leader:单位管理员  member:单位设计师 referee:裁判 ,不配置代表都显示
// 配置顺序不影响显示顺序
// type:static  前端控制的菜单（后台没配置但是需要显示的）sort:排序 parent:父菜单(一级的不需要配置) (配置参考 testStaticMenu)

import { MICRO_NAME } from '@/micro/config.js'

export default {
    teacherHome:{
        title: '首页',
        redirect: '/image',
        icon: 'res-icon',
        showRole: ['leader'],
        type:'static',
        component: (resolve) => {
            require(['@/view/teaching/homer.vue'], resolve)

        },
    },
    teachingHome:{
        title: '教学主页',
        redirect: '/image',
        icon: 'res-icon',
        showRole: ['leader'],
        type:'static',
        component: (resolve) => {
            require(['@/view/teaching/teacherHomer.vue'], resolve)
            
        },
    },
    teacherClass:{
        title: '我的课程',
        redirect: '/image',
        icon: 'res-icon',
        showRole: ['leader'],
        type:'static',
        component: (resolve) => {
            require(['@/view/teaching/classList.vue'], resolve)
        },
    },
    teacherLessonPlan:{
        title: '我的教案',
        redirect: '/image',
        icon: 'res-icon',
        showRole: ['leader'],
        type:'static',
        component: (resolve) => {
            require(['@/view/teaching/lessonResource.vue'], resolve)
        },
    },
    teacherTask:{
        title: '我的任务',
        redirect: '/image',
        icon: 'res-icon',
        showRole: ['leader'],
        type:'static',
        component: (resolve) => {
            require(['@/view/teaching/taskList.vue'], resolve)
        },
    },

    studentHome:{
        title: '学生首页',
        redirect: '/studentHome',
        icon: 'res-icon',
        showRole: ['leader'],
        type:'static',
        component: (resolve) => {
            require(['@/view/student/homer.vue'], resolve)
        },
    },
    studyHomer:{
        title: '学习首页',
        redirect: '/studyHomer',
        icon: 'res-icon',
        showRole: ['leader'],
        type:'static',
        component: (resolve) => {
            require(['@/view/student/studyHomer.vue'], resolve)
        },
    },

    // studentHome:{
    //     title: '学生首页',
    //     redirect: '/image',
    //     icon: 'res-icon',
    //     showRole: ['member'],
    //     type:'static',
    //     component: (resolve) => {
    //         require(['@/view/teaching/homer.vue'], resolve)
    //     },
    // },
    
    
    
    
    
    
    // 以前的 资源
  resourceManagement: {
    title: '资源',
    redirect: '/image',
    icon: 'res-icon',
    showRole: ['leader', 'member']
  },
  guide: {
    name: 'guide',
    title: '指导书',
    component: (resolve) => {
      require(['@/view/resourceManagement/guide.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },
  icon: {
    name: 'icon',
    title: 'ICON',
    component: (resolve) => {
      require(['@/view/resourceManagement/icon.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },

  uploadFile: {
    name: 'uploadFile',
    title: '文件',
    component: (resolve) => {
      require(['@/view/resourceManagement/uploadFile.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },
  video: {
    name: 'video',
    title: '视频',
    component: (resolve) => {
      require(['@/view/resourceManagement/video.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },
    


  coSet: {
    name: 'coSet',
    title: '单位设置',
    component: (resolve) => {
      require(['@/view/coSet/coSet.vue'], resolve)
    },
    icon: 'danwei-icon',
    showRole: ['leader']
  },
  memberManagement: {
    name: 'memberManagement',
    title: '人员',
    redirect: '/user',
    icon: 'users-icon',
    showRole: ['leader', 'member']
  },


  // 新课件
  createExp: {
    // path: '/createExp',
    name: 'createExp',
    title: '创建课件',
    component: (resolve) => {
      // D:\workspace\linew\training\src\view\experimentalScene\designPanel\experimentWrap.vue
      // require(['@/view/resourceManagement/questionBank.vue'], resolve);
      require(['@/view/experimentalScene/designPanel/experimentWrap'], resolve)
      //  require(['@/view/experimentalScene/designPanel/creatExp'], resolve);
      // require(['@/view/resourceManagement/videoLearn.vue'], resolve);
    },
    //    type:'static', //前端控制的菜单（后台没配置但是需要显示的）
    parent: 'designPanel', //父级
    sort: -1,
    showRole: ['leader', 'member']
  },
  designPanel: {
    name: 'designPanel',
    title: '自学计划',
    redirect: '/experiment',
    showRole: ['leader', 'member']
  },
  videoLearn: {
    name: 'videoLearn',
    title: '视频自学',
    component: (resolve) => {
      //require(['@/view/experimentalScene/designPanel/experiment.vue'], resolve);
      require(['@/view/resourceManagement/videoLearn.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },
  experiment: {
    name: 'experiment',
    title: '实操课件',
    component: (resolve) => {
      require(['@/view/experimentalScene/designPanel/experimentWrap'], resolve)
      // require(['@/view/experimentalScene/designPanel/experiment.vue'], resolve);
    },
    showRole: ['leader', 'member']
  },
  videoExp: {
    name: 'videoExp',
    title: '理论课件',
    component: (resolve) => {
      require(['@/view/experimentalScene/designPanel/experimentWrap'], resolve)
      // require(['@/view/experimentalScene/designPanel/experiment.vue'], resolve);
      // require(['@/view/resourceManagement/videoLearn.vue'], resolve);
    },
    showRole: ['leader', 'member']
  },
  coursewareExp: {
    name: 'coursewareExp',
    title: '文本课件',
    component: (resolve) => {
      require(['@/view/experimentalScene/designPanel/experimentWrap'], resolve)
      //  require(['@/view/experimentalScene/designPanel/experiment.vue'], resolve);
    },
    showRole: ['leader', 'member']
  },
  course: {
    name: 'course',
    title: '课程',
    component: (resolve) => {
      require(['@/view/experimentalScene/designPanel/course.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },
  schedulePlan: {
    name: 'schedulePlan',
    title: '排课计划',
    redirect: '/class',
    showRole: ['leader', 'member']
  },
  class: {
    name: 'class',
    title: '教学管理',
    component: (resolve) => {
      // 新教学班
      require(['@/view/experimentalScene/schedulePlan/myClass.vue'], resolve)
      // require(['@/view/experimentalScene/schedulePlan/myClass.vue'], resolve);
    },
    icon: 'px-icon',
    showRole: ['leader', 'member']
  },
  examPlan: {
    name: 'examPlan',
    title: '考试计划',
    redirect: '/testPaper',
    showRole: ['leader', 'member']
  },
  testPaper: {
    name: 'testPaper',
    title: '试卷',
    component: (resolve) => {
      require(['@/view/experimentalScene/examPlan/testPaper.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },
  exam: {
    name: 'exam',
    title: '考试',
    component: (resolve) => {
      require(['@/view/experimentalScene/examPlan/exam.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },
  examself: {
    name: 'examself',
    //path: `/class`,
    title: '自测',
    component: (resolve) => {
      require(['@/view/experimentalScene/examPlan/exam.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },
  // examMicro: {
  //     name: 'examMicro',
  //     path: `/rsng-designer/guide`,
  //     title: '微服务指导书',
  //     showRole:['leader','member']
  // },
  questionnaireSurvey: {
    name: 'questionnaireSurvey',
    title: '问卷调查',
    component: (resolve) => {
      require(['@/view/questionnaire-survey/index.vue'], resolve)
    },
    icon: 'wj-icon',
    showRole: ['leader', 'member']
  },

  taskManagement: {
    name: 'taskManagement',
    title: '任务管理',
    redirect: '/taskManage',
    icon: 'task-icon',
    showRole: ['leader', 'member']
  },
  taskManage: {
    name: 'taskManage',
    title: '任务管理',
    component: (resolve) => {
      require(['@/view/taskManagement/task.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },
  trainScene: {
    name: 'trainScene',
    title: '训练场景',
    component: (resolve) => {
      require(['@/view/train/trainScene.vue'], resolve)
    },
    icon: 'train-icon',
    showRole: ['leader', 'member']
  },
  projectManagement: {
    name: 'projectManagement',
    title: '攻防研究',
    redirect: '/project',
    icon: 'study-icon',
    showRole: ['leader', 'member']
  },
  project: {
    name: 'project',
    title: '攻防研究',
    component: (resolve) => {
      require(['@/components/project/project.vue'], resolve)
      // require(['@/view/projectManagement/project.vue'], resolve);
    },
    showRole: ['leader', 'member']
  },
  filing: {
    name: 'filing',
    title: '归档管理',
    component: (resolve) => {
      require(['@/view/filing/filing.vue'], resolve)
    },
    icon: 'archive-icon',
    showRole: ['leader', 'member']
  },
  experimenterTrack: {
    name: 'experimenterTrack',
    title: '操作员轨迹',
    redirect: '/expTrack',
    icon: 'track-icon',
    showRole: ['leader', 'member']
  },
  archiveReports: {
    name: 'archiveReports',
    title: '归档报告',
    component: (resolve) => {
      require(['@/view/experimenterTrack/archiveReports.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },
  expTrack: {
    name: 'expTrack',
    title: '操作员轨迹',
    component: (resolve) => {
      require(['@/view/experimenterTrack/compositeScore.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },
  achorQuery: {
    name: 'achorQuery',
    title: '锚定查询',
    component: (resolve) => {
      require(['@/view/experimenterTrack/achorQuery.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },
  excellentStudent: {
    name: 'excellentStudent',
    title: '优秀学员',
    component: (resolve) => {
      require(['@/view/experimenterTrack/excellentStudent.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },
  bulletin: {
    name: 'bulletin',
    title: '公告',
    redirect: '/bulletinSend',
    icon: 'bulletin-icon'
  },
  bulletinSend: {
    name: 'bulletinSend',
    title: '我发送的',
    component: (resolve) => {
      require(['@/view/bulletin/bulletin.vue'], resolve)
    }
  },
  bulletinReceive: {
    name: 'bulletinReceive',
    title: '我接收的',
    component: (resolve) => {
      require(['@/view/bulletin/myReceive.vue'], resolve)
    }
  },
  operatLog: {
    name: 'operatLog',
    title: '日志',
    component: (resolve) => {
      require(['@/view/operatLog/log.vue'], resolve)
    },
    icon: 'log-icon',
    showRole: ['leader', 'member']
  },


  toolMagazine: {
    title: '工具库',
    component: (resolve) => {
      require(['@/view/resourceManagement/toolkit.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },

  assetCommonComponent: {
    title: '资产公用组件',
    icon: 'res-icon',
    component: (resolve) => {
      require(['@/view/testPlatform/asset/assetCommonComponent.vue'], resolve)
    },
    parent: 'asset1',
    showRole: ['leader', 'member']
  },


  toolManage: {
    title: '工具库',
    component: (resolve) => {
      require(['@/view/resourceManagement/toolkit.vue'], resolve)
    },
    showRole: ['leader', 'member']
  },
  examManage: {
    name: 'examManage',
    title: '考核管理',
    redirect: '/examManage',
    icon: 'track-icon',
    showRole: ['leader', 'member']
  },

  contentManage: {
    title: '内容管理',
    redirect: '/contentManage',
    icon: 'res-icon',
    showRole: ['leader', 'member']
  },

  centerManage: {
    name: 'filing',
    title: '管理中心',
    icon: 'archive-icon',
    showRole: ['leader', 'member']
  },

  personCenter: {
    title: '个人中心',
    path: `/personCenter`,
    icon: 'personal-icon',
    showRole: ['leader', 'member']
  },



  files: {
    title: '文件管理', //
    path: `/${MICRO_NAME}/files`,
    icon: 'gc-icon',
      // type:'static',
    showRole: ['leader', 'member']
  },
  image: {
    title: '镜像管理', //
    path: `/${MICRO_NAME}/image`,
    icon: 'gc-icon',
    showRole: ['leader', 'member']
  },
  device: {
    title: '实物设备',
    path: `/${MICRO_NAME}/device`,
    icon: 'gc-icon',
    showRole: ['leader', 'member']
  },
  template: {
    title: '模板管理', //template
    path: `/${MICRO_NAME}/template`,
    icon: 'gc-icon',
    showRole: ['leader', 'member']
  },

  // 人员管理
  user: {
    title: '单位人员',
    path: `/${MICRO_NAME}/user`,
    icon: 'gc-icon',
    showRole: ['leader', 'member']
  },
  groups: {
    title: '实验组',
    path: `/${MICRO_NAME}/groups`,
    icon: 'gc-icon',
    showRole: ['leader', 'member']
  },

  projectManage: {
    title: '工程管理',
    path: `/${MICRO_NAME}/project`,
    icon: 'gc-icon',
    showRole: ['leader', 'member']
  },

  //     系统公告：
  send: {
    title: '我发送的',
    path: `/${MICRO_NAME}/send`,
    icon: 'gc-icon',
    showRole: ['leader', 'member']
  },

  noticeManage: {
    title: '公告管理',
    icon: 'gc-icon',
    showRole: ['leader', 'member']
  },
  receive: {
    title: '我接收的',
    path: `/${MICRO_NAME}/receive`,
    icon: 'gc-icon',
    showRole: ['leader', 'member']
  },

  // 个人信息：personal
  baseInfo: {
    title: '个人信息',
    path: `/${MICRO_NAME}/personal`,
    icon: 'gc-icon',
    showRole: ['leader', 'member']
  }
}

